package com.zzl.bonds.ticket.constant.type;

/**
 * 1.普通信息,2.模板信息3.图片4.地址5.表情6.视频7.语音8.文件9.其他
 *
 * @author : gull
 * @date : 2021/12/9 14:11
 */
public enum MsgTypeEnum {

    /**
     * 1.普通信息,2.模板信息3.图片4.地址5.表情6.视频7.语音8.文件9.其他
     */
    MSG_TYPE_ORDINARY(1, "普通信息"),

    MSG_TYPE_TEMPLATE(2, "模板信息"),

    MSG_TYPE_PICTURE(3, "图片"),

    MSG_TYPE_ADDRESS(4, "地址"),
    MSG_TYPE_EMO(5, "表情"),
    MSG_TYPE_VIDEO(6, "视频"),
    MSG_TYPE_VOICE(7, "语音"),
    MSG_TYPE_FILE(8, "文件"),

    MSG_TYPE_OTHER(9, "其他"),
    ;


    private final Integer code;
    private final String value;


    MsgTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (MsgTypeEnum statusEnum : MsgTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
